<?php
/**  index.php
 * Stuff...do it!
 * 
 * @author Ted, tass2001-at-gmail-dot-com
 * @package phpsimpleblog
 * @version $Id: index.php 13 2013-03-31 02:20:53Z tass2001@gmail.com $
 */
    define('APP','PHPSIMPLEBLOG');
    define("DEBUG",$_REQUEST['dbg']);
    if(DEBUG){
	error_reporting(E_ALL);
	ini_set('display_errors','1');
    }else{
	error_reporting(0);
    }
    define('DOC_ROOT', realpath(dirname(__FILE__)));
    spl_autoload_register('blog_autoload');
    date_default_timezone_set('America/Los_Angeles'); 
    function blog_autoload($class_name){
        $filename = sprintf('%s/includes/class.%s.php',DOC_ROOT,strtolower($class_name));
        if(file_exists($filename))
            require $filename;
    }
    $blog = new SimpleBlog();
    $blog->dispatch($_SERVER['REQUEST_URI']);
?>